package com.study.listener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class ListenerTest {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MainConfigListener.class);



        context.publishEvent(new MyEvent("1"));
        context.publishEvent(new ApplicationEvent(new Object()) {

        });
        context.close();

    }
}
